home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 4
/
FM Towns Free Software Collection 4 - Disc 1.iso
/
fb386
/
biorism
/
baio.bas
next >
Wrap
BASIC Source File
|
1991-10-18
|
8KB
|
214 lines
10 '********************************************************************
20 '* *
30 '* バイオリズム *
40 '* *
50 '* 制作 谷口 利一 (kazu) *
60 '* *
70 '* I D MHF01402 *
80 '* *
90 '********************************************************************
100 SCREEN@ 2
110 DIM DA(13)
120 DA(1)=31:DA(2)=28:DA(3)=31:DA(4)=30:DA(5)=31:DA(6)=30:DA(7)=31
130 DA(8)=31:DA(9)=30:DA(10)=31:DA(11)=30:DA(12)=31
140 COLOR 0,[255,255,255],[200,200,200],0
150 CLS
160 SYMBOL(230,100),"マウスで選んでください",1,1,2
170 SYMBOL(130,210),"西暦で入力",1,1,3
180 SYMBOL(400,210),"平成、昭和で入力",1,1,3
190 MOUSE 0
200 MOUSE 1,300,300,1
210 WHILE MOUSE(2,0)=0
220 WEND
230 X=MOUSE(0):Y=MOUSE(1)
240 A_J=0
250 IF X>305 AND Y<250 THEN A_J=2
260 IF X<305 AND Y<250 THEN A_J=3
270 MOUSE 5
280 CLS
290 LINE (0,0)-(638,80),PSET,[100,100,100],BF'上の枠の色
300 LINE (0,0)-(638,80),PSET,[255,255,255],B'上の枠
310 SYMBOL(180,23),"バ イ オ リ ズ ム",2,2,[25,200,40],0,,4
320 LINE (0,81)-(639,479),PSET,[155,155,155],BF
330 LINE (18,150)-(616,212),PSET,[255,255,255],BF'真ん中の枠の色
340 LINE (18,150)-(616,212),PSET,[0,0,0],B'真ん中の枠
350 LINE (21,213)-(620,217),PSET,[0,0,0],BF'真ん中の枠の色 黒
360 LINE (617,154)-(621,217),PSET,[0,0,0],BF'真ん中の枠の色 黒
370 IF A_J=2 THEN 540
380 IF A_J=3 THEN 390 ELSE 190
390 '
400 F_F=0:DA_1=0:DA_2=0
410 LOCATE 15,9,0 :INPUT"表示する年は19",H_Y
420 HHY=H_Y:UU=1
430 LINE (19,151)-(615,211),PSET,[255,255,255],BF'真ん中の枠の色
440 LOCATE 15,9,0 :INPUT"表示する月は ",H_M
450 LINE (19,151)-(615,211),PSET,[255,255,255],BF'真ん中の枠の色
460 LOCATE 15,9,0 :INPUT"生まれた年は19",T_Y
470 LINE (19,151)-(615,211),PSET,[255,255,255],BF'真ん中の枠の色
480 LOCATE 15,9,0 :INPUT"生まれた月は ",T_M
490 LINE (19,151)-(615,211),PSET,[255,255,255],BF'真ん中の枠の色
500 LOCATE 15,9,0 :INPUT"生まれた日は ",T_D
510 WAIT 25
520 LINE (17,149)-(625,220),PSET,[155,155,155],BF
530 GOTO 690
540 F_F=0:DA_1=0:DA_2=0
550 '
560 LOCATE 15,9,0 :INPUT"表示する年は平成 ",H_Y
570 HHY=H_Y:UU=2
580 LINE (19,151)-(615,211),PSET,[255,255,255],BF'真ん中の枠の色
590 LOCATE 15,9,0 :INPUT"表示する月は ",H_M
600 LINE (19,151)-(615,211),PSET,[255,255,255],BF'真ん中の枠の色
610 LOCATE 15,9,0 :INPUT"生まれた年は昭和 ",T_Y
620 LINE (19,151)-(615,211),PSET,[255,255,255],BF'真ん中の枠の色
630 LOCATE 15,9,0 :INPUT"生まれた月は ",T_M
640 LINE (19,151)-(615,211),PSET,[255,255,255],BF'真ん中の枠の色
650 LOCATE 15,9,0 :INPUT"生まれた日は ",T_D
660 WAIT 25
670 LINE (17,149)-(625,220),PSET,[155,155,155],BF
680 H_Y=H_Y+88:T_Y=T_Y+25
690 H_Y=H_Y+1900
700 T_Y=T_Y+1900
710 A_A=T_Y-1900 '1900年~誕生年までの年数
720 B_B=A_A MOD 4 '年数を4で割った余り
730 C_C=H_Y-T_Y '表示年~誕生年までの年数
740 D_D=B_B+C_C '年数と余りの年数の合計
750 E_E=INT(D_D/4) '閏年の計算
760 G_G=H_Y MOD 4
770 IF B_B=0 THEN E_E=E_E+1
780 F_F=(H_Y+1-T_Y)*365+E_E '年数の計算
790 FOR I=1 TO T_M STEP 1
800 DA_1=DA_1+DA(I-1)
810 NEXT I
820 FOR I=H_M TO 12 STEP 1
830 DA_2=DA_2+DA(I)
840 NEXT I
850 IF B_B=0 AND T_M>=3 THEN DA_1=DA_1+1
860 IF G_G=0 AND H_M<=2 THEN DA_2=DA_2+1
870 DAY=F_F-(DA_1+DA_2)-(T_D-1)
880 '-------------------------------------------------------------------
890 II=17*DA(H_M)
900 IF G_G=0 AND H_M=2 THEN II=II+1
910 FOR I=1 TO II STEP 17
920 LINE (638-I,102)-(638-I,294),PSET,3
930 NEXT I
940 FOR I=0 TO 194 STEP 96
950 IF DA(H_M)=31 THEN N=0
960 IF DA(H_M)=30 THEN N=17
970 IF G_G=0 AND H_M=2 THEN N=34
980 IF G_G><0 AND H_M=2 THEN N=51
990 LINE (128+N,102+I)-(638,102+I),PSET,3
1000 NEXT I
1010 '--------------------------------------------------------------------
1020 C_Y=(31-DA(H_M))*17
1030 IF UU=1 THEN LOCATE 1,6,0 :PRINT"19":LOCATE 3,6,0 :PRINT HHY:LOCATE 6,6,0 :PRINT"年":LOCATE 8,6,0 :PRINT H_M: LOCATE 11,6,0 :PRINT"月"
1040 IF UU=2 THEN LOCATE 1,6,0 :PRINT"平成":LOCATE 5,6,0 :PRINT HHY:LOCATE 7,6,0 :PRINT"年":LOCATE 9,6,0 :PRINT H_M: LOCATE 12,6,0 :PRINT"月"
1050 SYMBOL(90,195),"感情",1,1,5
1060 SYMBOL(90,235),"身体",1,1,4
1070 SYMBOL(90,275),"知性",1,1,6
1080 IF G_G=0 AND H_M=2 THEN C_Y=C_Y-17
1090 SYMBOL(123+C_Y,87),"1",1,1,4
1100 SYMBOL(123+68+C_Y,87),"5",1,1,4
1110 SYMBOL(123+149+C_Y,87),"10",1,1,4
1120 SYMBOL(123+234+C_Y,87),"15",1,1,4
1130 SYMBOL(123+319+C_Y,87),"20",1,1,4
1140 SYMBOL(123+406+C_Y,87),"25",1,1,4
1150 IF DA(H_M)=31 THEN SYMBOL(123+489+C_Y,87),"30",1,1,4
1160 '--------------------------------------------------------------------
1170 YY=DAY MOD 23
1180 DD=(DA(H_M)-28)*17
1190 IF G_G=0 AND H_M=2 THEN DD=DD+17
1200 AA=YY*.274!
1210 BB=YY*17
1220 BB=BB+DD
1230 OX=176-BB
1240 A=AA-.1!:B=20:DX=.1!
1250 FOR X=1 TO 100 STEP 1
1260 A=A+.1!
1270 Y=SIN(A)*3
1280 XG=OX+63*A:YG=190-31*Y
1290 SYMBOL(XG,YG),"・",1,1,4
1300 NEXT X
1310 '--------------------------------------------------------------------
1320 YY=DAY MOD 28
1330 DD=(DA(H_M)-28)*17
1340 IF G_G=0 AND H_M=2 THEN DD=DD+17
1350 AA=YY*.225!
1360 BB=YY*17
1370 BB=BB+DD
1380 OX=176-BB
1390 A=AA-.1!:B=20:DX=.1!
1400 FOR X=1 TO 100 STEP 1
1410 A=A+.1!
1420 Y=SIN(A)*3
1430 XG=OX+77*A:YG=190-31*Y
1440 SYMBOL(XG,YG),"・",1,1,5
1450 NEXT X
1460 '--------------------------------------------------------------------
1470 YY=DAY MOD 33
1480 DD=(DA(H_M)-28)*17
1490 IF G_G=0 AND H_M=2 THEN DD=DD+17
1500 AA=YY*.189!
1510 BB=YY*17
1520 BB=BB+DD
1530 OX=176-BB
1540 A=AA-.1!:B=20:DX=.1!
1550 FOR X=1 TO 100 STEP 1
1560 A=A+.1!
1570 Y=SIN(A)*3
1580 XG=OX+90*A:YG=190-31*Y
1590 SYMBOL(XG,YG),"・",1,1,6
1600 NEXT X
1610 U=0
1620 FOR I=1 TO 3
1630 U=U+1
1640 LINE (205-U,375+I)-(445,375+I),PSET,[0,0,0]' 黒 横
1650 LINE (445+I,325-U)-(445+I,378),PSET,[0,0,0]' 黒 縦
1660 LINE (202,325-I)-(445+U,325-I),PSET,[255,255,255]' 白 横<-- ^
1670 LINE (205-I,325)-(205-I,375+U),PSET,[255,255,255]' 白 縦
1680 '--------------------------------------------------------------------
1690 LINE (160-U,450+I)-(300,450+I),PSET,[0,0,0]' 黒 横
1700 LINE (300+I,400-U)-(300+I,453),PSET,[0,0,0]' 黒 縦
1710 LINE (157,400-I)-(300+U,400-I),PSET,[255,255,255]' 白 横<-- ^
1720 LINE (160-I,400)-(160-I,450+U),PSET,[255,255,255]' 白 縦
1730 '--------------------------------------------------------------------
1740 LINE (350-U,450+I)-(490,450+I),PSET,[0,0,0]' 黒 横--> ^
1750 LINE (490+I,400-U)-(490+I,453),PSET,[0,0,0]' 黒 縦
1760 LINE (347,400-I)-(490+U,400-I),PSET,[255,255,255]' 白 横
1770 LINE (350-I,400)-(350-I,450+U),PSET,[255,255,255]' 白 縦
1780 NEXT I
1790 SYMBOL(230,335)," もういちど",2,2,[205,155,15]
1800 SYMBOL(150,410)," す る しない",2,2,[105,100,25]
1810 MOUSE 0
1820 MOUSE 1,325,425,1
1830 MOUSE 4,157,400,490,450
1840 WHILE MOUSE(2,0)=0
1850 WEND
1860 X=MOUSE(0):Y=MOUSE(1)
1870 A_K=0
1880 IF X>325 THEN A_K=2
1890 MOUSE 5
1900 IF A_K=2 THEN 2010 ELSE 1910
1910 '--------------------------------------------------------------------
1920 U=0
1930 FOR I=1 TO 3
1940 U=U+1
1950 LINE (160-U,450+I)-(300,450+I),PSET,[255,255,255]' 白 横<-- ^
1960 LINE (300+I,400-U)-(300+I,453),PSET,[255,255,255]' 白 縦
1970 LINE (157,400-I)-(300+U,400-I),PSET,[0,0,0]' 黒 横
1980 LINE (160-I,400)-(160-I,450+U),PSET,[0,0,0]' 黒 縦
1990 NEXT I
1991 WAIT 50
2000 GOTO 140
2010 '--------------------------------------------------------------------
2020 U=0
2030 FOR I=1 TO 3
2040 U=U+1
2050 LINE (350-U,450+I)-(490,450+I),PSET,[255,255,255]' 白 横
2060 LINE (490+I,400-U)-(490+I,453),PSET,[255,255,255]' 白 縦
2070 LINE (347,400-I)-(490+U,400-I),PSET,[0,0,0]' 黒 横--> ^
2080 LINE (350-I,400)-(350-I,450+U),PSET,[0,0,0]' 黒 縦
2090 NEXT I
2091 WAIT 50
2100 '--------------------------------------------------------------------
2110 CLS:END